{template 'common/header'}
<script type="text/javascript" src="../addons/zsk_award/js/common.js"></script>
<div>
<div class="panel panel-info">
	<div class="panel-heading" style="text-align: center;">中奖记录</div>
	<div class="panel-body">
		<div class="row">
			<form action="" method="post" id="keyform">
				
			<div class="col-xs-6 col-sm-4">
				<input type="text" name="key" placeholder="活动名称" value="{$param['key']}" class="form-control" style="display: inline-block;" /></div>
			</form>
			<div class="col-xs-6 col-sm-4">
				<button class="btn btn-default" style="display: inline-block;" onclick="search()" form="keyform">搜索</button>  
			<div class="clearfix visible-xs-block"></div>
			<div class="col-xs-6 col-sm-4"> </div>	
		</div> 
	</div>
</div>
<table class="table table-bordered">
	<thead>
		<tr>
		    <th style="width: 100px;">活动名称</th> 
			<th style="width: 100px;">用户姓名</th> 
			<th style="width: 100px;">电话</th> 
			<th style="width: 100px;">地址</th> 
			<th style="width: 120px;">中奖等级</th>
			<th style="width: 120px;">中奖内容</th>
			<th style="width: 220px;">操作</th>
		</tr>
	</thead>
	<tbody>
		{loop $result $index $item}
		<tr>
			<td>{$item['activityname']}</td>
			<td>{$item['username']} </td>
			<td>{$item['phonenumber']} </td>
			<td>{$item['address']} </td>
			<td>{$item['res']} 等奖</td>
			<td>{$item['awardrecord']} </td>
			<td>
				<a  onclick="reset()" >删除</a>
			</td>
		</tr>
		{/loop}
		<tr>
			<td colspan="7" align="center">
				
			</td>
		</tr>
	</tbody>

</table>
 
</div>

<script type="text/javascript">
	function reset(){
		modalDlg("确定要删除吗？",function(){
		window.location.href="<?php echo $this->createWebUrl('DeleteAwardrecord',array('id'=>$item['id']));?>";
		});
	}
	function search(){
		window.location.href="<?php echo $this->createWebUrl('AwardRecordSearch');?>";
	}
</script>
{template 'common/footer'}
